package org.ix.gateway.route.model.request;

import org.ix.common.constant.SortConstants;
import org.ix.common.models.QueryRequest;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Collection;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@ApiModel(description = "网关路由查询条件请求实体")
@Getter
@Setter
@ToString
public class GatewayRouteQueryRequest extends QueryRequest {

    @ApiModelProperty(value = "路由id")
    private String id;

    @ApiModelProperty(value = "路由id列表")
    private Collection<String> idIn;

    @ApiModelProperty(value = "路由id包含")
    private String idContains;

    @ApiModelProperty(value = "是否删除")
    private Integer deleted;

    public void setIdSort(SortConstants sortConstants)  {
        super.orderBy("id", sortConstants);
    }

    public void getIdSort()  {
        super.getOrderBy().getOrDefault("id", null);
    }
}
